package org.vogelsk.blue.objects;

/**
 * 
 * Class representing goodie objects, that fall from bricks that contain them, 
 * and have various effects on paddle properties
 * 
 * @author dejan.dosic
 *
 */

public class Goodie extends GenericCreature{

	public static final int STANDARD_GOODIE_SPEED = 4;
	private boolean active = false;
	private GoodieType type;
	
	public Goodie( double d, double e, GoodieType type) {
		super(1,1, d, e, STANDARD_GOODIE_SPEED, false);
		this.type = type;
	}

	@Override
	public void move() {
		// goodies fall straight down.
		if (active)
		setY(getY() + (getSpeed() * getHeight()));
	}

	public GoodieType getType() {
		return type;
	}

	public void setType(GoodieType type) {
		this.type = type;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}
	

	
}
